<?
include("include/session.php");?>
<!DOCTYPE PHP>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home - PizzaRio</title>
<link href="CSS/opmaak.css" rel="stylesheet" type="text/css"><!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; }  /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<![endif]-->
</head>

<body>

<div class="container">

  <div class="header">
  
  <img src="Images/Header.png" alt="PizzaRio">
    
    <!-- end .header--></div>
  <div class="nav">
  
  <? include("nav.html");?>
    <!-- end .nav --></div>
    
    
 

  <div class="bestellen">
  
  <a href="samenstellen.php"><img src="Images/Bestelmenu.png"></a>

    <!-- end .content --></div>
    
    <div class="inloggen">
    <table>
<tr><td>


<?

/**
 * User has already logged in, so display relavent links, including
 * a link to the admin center if the user is an administrator.
 */
if($session->logged_in){
   echo "<h1>Logged In</h1>";
   echo "Welcome <b>$session->username</b>, you are logged in. <br><br>"
       ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] <br>"
       ."[<a href=\"useredit.php\">Edit Account</a>] <br>";
   if($session->isAdmin()){
      echo "[<a href=\"admin/admin.php\">Admin Center</a>] <br>";
   }
   echo "[<a href=\"process.php\">Logout</a>]";
}
else{
?>

<h1>Login</h1>
<?
/**
 * User not logged in, display the login form.
 * If user has already tried to login, but errors were
 * found, display the total number of errors.
 * If errors occurred, they will be displayed.
 */
if($form->num_errors > 0){
   echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">Remember me next time &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr>
</table>
</form>

<?
}


?>


</td></tr>
</table>

    <!-- end .inloggen--></div>
    
    <div class="content">
    <h1>Actie's</h1><br /><br />
    <p><img src="Images/ActieFrontpage.jpg" alt="Actie April - Alle pizza's zijn 5,- bij afhalen, speciaal voor Hogeschool Rotterdam studenten en medewerkers*"><br /><br />
    *Bij vertoon van hun schoolpas.</p>
    <br />
    <br />
    
    <?

/**
 * Just a little page footer, tells how many registered members
 * there are, how many users currently logged in and viewing site,
 * and how many guests viewing site. Active users are displayed,
 * with link to their user information.
 */
echo "</td></tr><tr><td align=\"center\"><br><br>";
echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>";
echo "There are $database->num_active_users registered members and ";
echo "$database->num_active_guests guests viewing the site.<br><br>";

include("include/view_active.php");

?>
    <!-- end .content--></div>
    
    <div class="postcode">
     <? include("search.php");?>
   
    <!-- end .postcode--></div>
    
      <div class="sidebar1">
      
      	<center>
      	</center>

    <!-- end .sidebar1 --></div>
  
  		<div class="footer">
			<a href="index.php"><center><p1>Home</p1></center></a>
    	<!-- end .footer --></div>
    
		<div class="footer">
			<a href="overpizzario.php"><center><p1>Over PizzaRio</p1></center></a>    	
		<!-- end .footer --></div>
  
		<div class="footer">
			<a href="vestigingen.php"><center><p1>Vestigingen</p1></center></a>
    	<!-- end .footer --></div>
    
		<div class="footer">
			<a href="voorwaarden.php"><center><p1>Voorwaarden</p1></center></a>
   		<!-- end .footer --></div>
    
  <!-- end .container --></div>
</body>
</html>